import ls from './storage';
import { ACCESS_TOKEN } from '@/store/types';

async function setToken(token: string): Promise<string> {
	ls.set(ACCESS_TOKEN, token);
	return token;
}

function getToken(): string {
	return ls.get(ACCESS_TOKEN);
}

function removeToken(): string {
	ls.remove(ACCESS_TOKEN);
	return '';
}

export {
	setToken,
	getToken,
	removeToken,
}